how to calculate xor of two numbers in java